package com.goods.business.service.imp;

import com.goods.business.mapper.InStockInfoMapper;
import com.goods.business.service.InStockInfoService;
import com.goods.common.model.business.InStockInfo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import tk.mybatis.mapper.entity.Example;

import java.util.List;

/**
 * @author ：Hachimen
 * @date ：Created in 2021/9/25 16:08
 * @description：
 * @modified By：
 * @version:
 */
@Service
public class InStockInfoServiceImpl implements InStockInfoService {
    @Autowired
    private InStockInfoMapper inStockInfoMapper;

    @Override
    public void add(InStockInfo inStockInfo) {
        inStockInfoMapper.insert(inStockInfo);
    }

    @Override
    public List<InStockInfo> getList(String inNum) {
        Example example = new Example(InStockInfo.class);
        Example.Criteria criteria = example.createCriteria();
        criteria.andEqualTo("inNum",inNum);
        List<InStockInfo> list = inStockInfoMapper.selectByExample(example);
        return list;
    }
}
